Skip to content

Refactor RecipeManager to use LINQ and PrototypesReloaded#43697

Open
AndrewFenriz wants to merge 2 commits intospace-wizards:masterfrom
Andrew-Fenriz:uploaded-recipes-fix
Open

Refactor RecipeManager to use LINQ and PrototypesReloaded#43697
AndrewFenriz wants to merge 2 commits intospace-wizards:masterfrom
Andrew-Fenriz:uploaded-recipes-fix

Conversation

@AndrewFenriz
Copy link
Copy Markdown
Contributor

About the PR

Refactors RecipeManager for better maintainability and adds support for prototype reloading.

Why / Balance

Technical improvement. It ensures that recipe changes are applied immediately and keeps the codebase clean.

Technical details

  • Replaced manual loops and RecipeComparer with a LINQ chain (Where, OrderByDescending).
  • Added OnPrototypesReloaded handler to update the recipe list when prototypes are modified in runtime.
  • Switched to file-scoped namespace and removed redundant code.
  • Removed unused SolidAppears method

Media

Not required.

Requirements

Breaking changes

None.

Changelog
No player-facing changes.

@PJBot PJBot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/S Denotes a PR that changes 10-99 lines. labels Apr 23, 2026
Copy link
Copy Markdown
Member

@Princess-Cheeseballs Princess-Cheeseballs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot better. I'll let another maintainer look at it since some of them have some opinions on LINQ.

@PJBot PJBot added the S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. label Apr 23, 2026
@Pok27 Pok27 added P3: Standard Priority: Default priority for repository items. T: Refactor Type: Refactor of notable amount of codebase D3: Low Difficulty: Some codebase knowledge required. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

D3: Low Difficulty: Some codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/S Denotes a PR that changes 10-99 lines. T: Refactor Type: Refactor of notable amount of codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants